package com.ss.android.article.base.feature.app;

import com.ss.android.article.base.feature.model.Article;
import com.ss.android.common.util.json.IJsonInstanceFactory;

import org.json.JSONObject;

public final class aa implements IJsonInstanceFactory {
    private static IJsonInstanceFactory a = new aa();

    private aa() {

    }

    public static IJsonInstanceFactory a() {
        return aa.a;
    }

    public final Object newInstance(Class<?> clazz, JSONObject jo) {
        Article v1_1 = null;
        if (clazz != null && jo != null && clazz == Article.class) {
            long v2 = jo.optLong("group_id");
            long v4 = jo.optLong("item_id");
            int v6 = jo.optInt("aggr_type");
            if (v2 > 0) {
                v1_1 = new Article(v2, v4, v6);
            }
        }

        return v1_1;
    }
}

